package edu.hgnc.test;


import edu.hgnc.cycleReference.A;
import edu.hgnc.populateBean.People;
import edu.hgnc.populateBean.Person;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 测试循环依赖
 */
public class JustTest9 {

	private static final Log logger = LogFactory.getLog(JustTest9.class);



	@Test
	public void test01() {
		logger.info("======================================================");
		logger.info("hello,when you see me,that's mean you are test succeed~");
		logger.info("======================================================");
	}


	@Test
	public void test02() {
		if (logger.isDebugEnabled()){
			logger.info("开始执行");
			ApplicationContext context = new ClassPathXmlApplicationContext("testCycleReference.xml");
			//	 模拟 http 调用Controller...
			Person person = context.getBean(Person.class);
			logger.info("person.getClass()"+person);
		}

	}

	@Test
	public void test03() {
			logger.info("开始执行");
			ApplicationContext context = new ClassPathXmlApplicationContext("testCycleReference.xml");
			//	 模拟 http 调用Controller...
			A people = context.getBean(A.class);
			logger.info("person.getClass()"+people);
	}

}
